import axios from 'axios'
import { BaseService } from './BaseService'

export class FileService extends BaseService {
    public async checkFile(hash: string) {
        const url = this.filesBaseUrl + '/check/' + hash
        return await axios.get(url)
    }

    public async uploadFile(date: FormData, type: string) {
        const url = this.filesBaseUrl + '/upload?type=' + type

        return await axios.post(url, date, { headers: { 'Content-Type': 'multipart/form-data' } })
    }
}
